import request from '@/utils/request';

//登录
export function fakeAccountLogin(params) {
  return request('/ngic-auth/sysAccount/login', {
    method: 'POST',
    data: params,
  });
}

//登出
export function fakeAccountLoginOut(params) {
  return request(`/ngic-auth/sysAccount/logout`, {
    method: 'POST',
    data: params,
  });
}

//登录
export function saveForRegister(params) {
  return request('/ngic-auth/sysAccountApply/saveForRegister', {
    method: 'POST',
    data: params,
  });
}

//个人信息
export function queryCurrentUser(params) {
  return request('/ngic-auth/sysUser/query', {
    method: 'POST',
    data: params,
  });
}

//获取菜单/权限/菜单/公司类型
export function getMenu(params) {
  return request(`/ngic-auth/sysPermission/queryMenu`, {
    method: 'POST',
    data: params,
  });
}

/*---------------菜单收藏-------------------*/
export function collectPerms(params) {
  return request(`/ngic-auth/sysUserPermission/collectPerm`, {
    method: 'POST',
    data: params,
  });
}

/*---------------取消菜单收藏-------------------*/
export function cancelCollectPerms(params) {
  return request(`/ngic-auth/sysUserPermission/cancelCollectPerm`, {
    method: 'POST',
    data: params,
  });
}
/*---------------菜单历史记录-------------------*/
export function mtosave(params) {
  return request(`/ngic-auth/sysUserVisitPermission/save`, {
    method: 'POST',
    data: params,
  });
}
